
import upperFirst from 'lodash/upperFirst'
import camelCase from 'lodash/camelCase'


let components = {}
const requireComponent = require.context('./', false, /[a-zA-Z]*\.vue$/)
requireComponent.keys().forEach(fileName=>{
	const componentConfig = requireComponent(fileName)
	
	const componentName = upperFirst(
		camelCase(
			fileName
			.replace(/^\.\/_/, '')
			.replace(/\.\w+$/, '')
			)
		)
	components[componentName] =  componentConfig.default || componentConfig

})

export default components